package com.ijiuchuang.jc_localization.contract;

import com.ijiuchuang.jc_localization.base.BasePresenter;
import com.ijiuchuang.jc_localization.base.BaseView;
import com.ijiuchuang.jc_localization.bean.bmob.Banner;
import com.ijiuchuang.jc_localization.bean.api.Keji;

import java.util.List;

import rx.Subscriber;
import rx.functions.Action1;

/**
 * Created by Veev on 2016/6/18
 *
 * @link 384506557@qq.com
 */
public interface HomeContract {

    interface View extends BaseView<Presenter> {
        // do in here
        void setBanners(List<Banner> list);
        void setTrends(Keji list);
    }

    interface Presenter extends BasePresenter {
        // do in here
    }

    interface Model {
        // do in here

        /**
         * 从网络获取 banner
         * @param action
         */
        void getBannersFromNet(Action1<List<Banner>> action);

        void saveBanners(List<Banner> list);

        void getKeji(Subscriber<Keji> subscriber);
        void getKeji(Action1<Keji> action1);
    }
}
